/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package be.darling.scrt.data;

import be.darling.scrt.design.RandomizationTest;
import be.darling.scrt.utilities.Plugin;

import java.util.HashMap;
import java.util.Iterator;

import org.w3c.dom.Node;

/**
 *
 * @author jingle
 */
public abstract class Reader implements Plugin {

    private String type;
    private String description;
    private String name;

    protected RandomizationTest test;

    protected HashMap<String, Object> options = new HashMap<String, Object>();
    protected Node NodeOptions;

    public Object getOption(String key)
    {
        return options.get(key);
    }

    //you need to be able to override the options
    public void setOptions(HashMap<String, Object> options) {
        this.options.putAll(options);
    }

    public void setOptions(Node options)  {
        this.NodeOptions = options;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setRandomizationTest(RandomizationTest test) {
        this.test = test;
    }

    protected RandomizationTest getRandomizationTest()
    {
        return this.test;
    }
    
    public abstract void read();
    public abstract void init();
}
